<!DOCTYPE html>
<html>
<head>
    <title>模型服务调用</title>
    <%- include headInclude.ejs %>
</head>
<body class="sticky-header">
<section>
    <!-- 左导航栏 -->
    <%- include header.ejs %>
    <div class="main-content">
        <!-- 上导航栏 -->
        <%- include nav.ejs %>
        <div class="panel panel-primary">
            <div class="panel-heading">
                模型服务信息
                <span class="tools pull-right">
                    <a href="javascript:;" class="fa fa-chevron-down"></a>
                 </span>
            </div>
            <div class="panel-body">
                <div class="row">
                    <div class="col-md-2">
                        <div class="blog-img">
                            <img src="/images/modelImg/default.png" alt="模型调用" >
                        </div>
                    </div>
                    <div class="col-md-7">
                        <p style="font-size: 14px; color:#aaa" >
                            <strong>模型名称&nbsp;:&nbsp;</strong><%=modelSer.ms_model.m_name  %>
                            <br />
                            <strong>模型类型&nbsp;:&nbsp;</strong><%=modelSer.ms_model.m_type %>
                            <br />
                            <strong>版本号&nbsp;:&nbsp;</strong><%=modelSer.mv_num %>
                            <br />
                            <strong>所在平台&nbsp;:&nbsp;</strong><%
                            if(modelSer.ms_platform == 1)
                            {
                            %><span class="label label-info">
                                    <i class="fa fa-windows"></i>
                                    windows
                                </span><%
                            }
                            else if(modelSer.ms_platform == 2)
                            {
                            %><span class="label label-info">
                                    <i class="fa fa-linux"></i>
                                    linux
                                </span><%
                            }
                            else
                            {
                            %><span class="label label-info">
                                    未知平台
                                </span><%
                            }
                            %>
                            <br />
                            <strong>部署时间&nbsp;:&nbsp;</strong><%=modelSer.ms_update %>
                            <br />
                            <strong>状态&nbsp;:&nbsp;</strong><% if(modelSer.ms_status == 1){
                            %><span class="badge badge-success">可用</span><%
                            }else {
                            %><span class="badge badge-defult">不可用</span><%
                            }%>
                            <br />
                            <strong>描述&nbsp;:&nbsp;</strong>
                            <br />
                            <%=modelSer.ms_des %>
                        </p>
                        <% if(modelSer.ms_model.m_url != null)
                        {
                        %><a style="more" href="<%=modelSer.ms_model.m_url %>" >更多信息</a><%
                        }%>
                        <br />
                        </p>
                    </div>
                </div>
            </div>
        </div>
        <div class="panel panel-info">
            <div class="panel-heading">
                数据输入
                <span class="tools pull-right">
                    <a href="javascript:;" class="fa fa-chevron-down"></a>
                 </span>
            </div>
            <div class="panel-body">
                <h4><strong>状态信息</strong></h4>
                <p><strong>名称&nbsp;:&nbsp;</strong><%= input.$.name %></p>
                <p><strong>描述&nbsp;:&nbsp;</strong><%= input.$.description %></p>
                <br />
                <h4><strong>事件</strong></h4>
                <section class="panel">
                    <header class="panel-heading custom-tab ">
                        <ul class="nav nav-tabs">
                            <% for(var i = 0; i < input.Event.length; i++){ %>
                            <li class="<% if(i == 0){%>active<%}%>">
                                <a href="#<%=input.Event[i].$.name + i.toString() %>" data-toggle="tab">
                                    <i class="fa fa-flash"></i>
                                    <%=input.Event[i].$.name %>
                                </a>
                            </li>
                            <% } %>
                        </ul>
                    </header>
                    <div class="panel-body">
                        <div class="tab-content">
                            <% for(var i = 0; i < input.Event.length; i++)
                            {%>
                            <div class="tab-pane <% if(i == 0){ %>active<%}%>" id="<%=input.Event[i].$.name + i.toString() %>">
                                <p><strong>类型：</strong><%=input.Event[i].$.type %></p>
                                <p><strong>描述：</strong><%=input.Event[i].$.description %></p>
                                <% if(input.Event[i].hasOwnProperty('ResponseParameter'))
                                {
                                    %><p><strong>数据参考：</strong><%=input.Event[i].ResponseParameter.$.datasetReference %></p><%
                                }
                                else if(input.Event[i].hasOwnProperty('DispatchParameter'))
                                {
                                    %><p><strong>数据参考：</strong><%=input.Event[i].DispatchParameter.$.datasetReference %></p><%
                                }
                                if(input.Event[i].$.type == 'response') { %>
                                <div class="btn-group btn-group-justified" style="width: 60%">
                                    <a href="#" class="btn btn-default"  >
                                        <i class="fa fa-pencil"></i>手动输入
                                    </a>
                                    <a href="#" class="btn btn-default"  >
                                        <i class="fa fa-file-text"></i>上传文件
                                    </a>
                                </div>
                                <% } %>
                            </div>
                            <% } %>
                        </div>
                    </div>
                </section>
            </div>
        </div>
        <div class="panel panel-danger">
            <div class="panel-heading">
                操作
            </div>
            <div class="panel-body" style="text-align: center;">
                <button href="#" class="btn btn-success" style="width: 20%" >
                    <i class="fa fa-cogs"></i>运行
                </button>
                <button href="#" class="btn btn-warning" style="width: 20%" >
                    <i class="fa fa-reply"></i>取消
                </button>
            </div>
        </div>
        <%- include footer.ejs %>
    </div>
</section>
<%- include footerInclude.ejs %>
<script type="text/javascript" src="/js/geomodel/modelser.js" ></script>
</body>
</html>
